package cn.kgc.Adjudicative.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>Project:Adjudicative_document
 * <p>Package:cn.kgc.Adjudicative.config
 * <p>ClassName:MybatisPlusConfig
 * <p>Powered by sun On 2023-01-10  14:02:28
 *
 * <p>Description:mybatis-plus分页拦截器
 *
 * @author 孙杰
 * @version 1.0
 * @date 2023/1/10 14:02
 * @since 11
 */
@Configuration
public class MybatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}
